package me.ilich.piet.interpreter;

import me.ilich.piet.interpreter.commands.Command;


public interface Stack {
	
	void execute(Command command);
	void setOnStateListener(OnStateListener listener);
	void setOnInListener(OnInListener listener);
	void setOnOutListener(OnOutListener listener);
	
	interface OnStateListener {
		void onEnd();
	}
	
	interface OnInListener {
		char onInChar();
		int onInNumber();
	}
	
	interface OnOutListener {
		void onOut(char c);
		void onOut(int i);
	}
	
	public interface Context {
		StackState getStackState();
		OnStateListener getOnStateListener();
		OnInListener getOnInListener();
		OnOutListener getOnOutListener();
	}

}
